package org.example.springbootquickstart.controller;

import org.example.springbootquickstart.pojo.User;
import org.example.springbootquickstart.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UsersController {

    @Autowired
    private UsersService usersService;


    @RequestMapping("/list")
    public List<User> getUsers()
    {
        return usersService.getUsers();
    }
}
